home *** CD-ROM | disk | FTP | other *** search
- /*
- * SETGFLAGS.C
- */
-
- #include "newlook.h"
-
- extern UWORD AddGadget( struct Window *, struct Gadget *, UWORD );
- extern VOID RefreshGList( struct Gadget *, struct Window *, struct Requester *, UWORD );
-
- void SetGFlags(w,g,flags)
- struct Window *w;
- struct Gadget *g;
- UWORD flags;
- {
- USHORT pos= RemoveGadgetSafely(w,g);
-
- g->Flags= flags;
-
- if(pos!=0xFFFF) /* 0xFFFF == (-1) did we really remove the gadget? */
- AddGadget(w,g, pos);
- RefreshGList(g,w,NULL,1L);
- }
-